<template>
<div>
  <lianxi4 v-for="(item,index) in list"
  :key="index"
  :imght="item.dogImgUrl"
  :longsi="item.dogName"
  @love="fn(item.dogName)"></lianxi4>
  <hr />
  <p>显示喜欢的名字:</p>
  <ul>
      <li v-for="(pong,obj) in linko "
      :key="obj">{{pong}}</li>
  </ul>
</div>
</template>
<script>
import lianxi4 from './conmporints/lianxi4'
export default {
     data () {
        return {
            list:[
    {
        dogImgUrl:
        "https://img2.baidu.com/it/u=2937681459,604052930&fm=26&fmt=auto&gp=0.jpg",
        dogName: "博美",
    },
    {
        dogImgUrl:
        "https://img2.baidu.com/it/u=2937681459,604052930&fm=26&fmt=auto&gp=0.jpg",
        dogName: "泰迪",
    },
    {
        dogImgUrl:
        "https://img2.baidu.com/it/u=2937681459,604052930&fm=26&fmt=auto&gp=0.jpg",
        dogName: "金毛",
    },
    {
        dogImgUrl:
        "https://img2.baidu.com/it/u=2937681459,604052930&fm=26&fmt=auto&gp=0.jpg",
        dogName: "哈士奇",
    },
    {
        dogImgUrl:
        "https://img2.baidu.com/it/u=2937681459,604052930&fm=26&fmt=auto&gp=0.jpg",
        dogName: "阿拉斯加",
    },
    {
        dogImgUrl:
        "https://img2.baidu.com/it/u=2937681459,604052930&fm=26&fmt=auto&gp=0.jpg",
        dogName: "萨摩耶",
    },

],
linko:[]
        }
    },
components: {
    lianxi4
},methods: {
    fn(p){
        this.linko.push(p)
    }
}
}
</script>

<style>

</style>